Scrapbox-like management of source code
nishio: I'm starting to feel like I'm managing Kozaneba's source code in a Scrapbox-like manner. In other words, source code was conventionally organized hierarchically by directories, but with "Jump to definition" in VSCode, which is equivalent to "Follow a link" in Scrapbox, "Jump to file name" in VSCode, which is equivalent to title suggestion in the search field of Scrapbox, and full-text search when it is still not found, the hierarchical structure becomes less important. Move to new file in VSCode's refactoring menu is equivalent to Scrapbox's New page.
This command cuts out reusable parts of the code or chunks of text that you want to mention individually on a separate page.
nishio: So, what's interesting is that Scrapbox has done away with the hierarchical structure altogether, while I still use the directorying of source code. When the main way to get there was to follow the hierarchy, the hierarchy had to be maintained properly, and it was easy to break down because people couldn't maintain it properly. However, if it is not the main way to get to a destination, there is little disadvantage because it means that "there are more options to get there" even if the hierarchical structure is maintained in an unrefined manner. When a new page is created, it is generated in the same directory as the original page by default.
"A group of things that seem loosely related" will be grouped together.
nishio: VSCode (at least in the TypeScript environment) updates the import statement when you move the file to another directory after the fact. So, you don't have to worry too much about where the file is created in the first place. nishio: so it would actually be good to include a hierarchical structure in the Wiki system. I think the important thing is that it runs so crisply that "how to find something other than following the hierarchy" is the main use. nishio: "Where to put the function quux to be called, whether from Foo or Bar?">> No problem, because it will fly with the definition jump wherever it is. ---
This page is auto-translated from /nishio/ソースコードをScrapbox的に管理. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.